import { IUserInfo } from "./login";

export type IRecommendGoodsItem = {
  createAt: string;
  description: string;
  exchangeCount: number;
  id: number;
  image: string;
  isDeleted: number;
  name: string;
  price: number;
  sortOrder: number;
  status: number;
  stock: number;
  updateAt: string;
};

export type IGoodsListReq = {
  page: number;
  pageSize: number;
  field: "price" | "exchange_count" | "";
  order: "ASC" | "DESC";
  name?: string;
};

export enum GoodsCategoryEnum {
  DEFAULT = "",
  PRICE = "price",
  EXCHANGE_COUNT = "exchange_count",
}
export enum OrderEnum {
  ASC = "ASC",
  DESC = "DESC",
}

export type ISelfPointsRes = {
  createdAt: string;
  updatedAt: string;
  remark: null;
  id: number;
  value: number;
};

export type ISelfPointListItemRes = {
  createdAt: string;
  updatedAt: string;
  hasReward: number;
  points: number;
  pointsType: number;
  title: string;
  id: number;
};

export enum pointsTypeEnum {
  INCREASE = 1,
  DECREASE = 0,
}

export type IPointRankRes = {
  createdAt: string;
  updatedAt: string;
  id: number;
  remark: string;
  value: number;
};

export type IExchangeItemRes = {
  createdAt: string;
  updatedAt: string;
  id: number;
  imageUrl: string;
  title: string;
};

export type IRankItemRes = {
  createdAt: string;
  updatedAt: string;
  id: number;
  remark: string;
  value: number;
  user: IUserInfo;
};

export type IPointsSelftRes = {
  createdAt: string;
  updatedAt: string;
  id: number;
  value: number;
  remark: string;
  rank: number;
};

export type IPointsHistoryItem = {
  date: string;
  points: number;
};
